package com.heima.wemedia.controller.v1;

import com.heima.model.common.dtos.ResponseResult;
import com.heima.wemedia.service.ChannelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 嘉德罗斯
 * @date 2021/11/22
 */
@RequestMapping("/api/v1/channel")
@RestController
public class ChannelController {

    @Autowired
    private ChannelService channelService;

    @GetMapping("/channels")
    public ResponseResult channels(){
        ResponseResult responseResult = channelService.find();
        return responseResult;
    }
}
